Do not emit a warning if the .haddock file is missing
authorJoachim Breitner <nomeata@debian.org>
Sat, 24 Jan 2026 12:41:42 +0000 (14:41 +0200)
committerIlias Tsitsimpis <iliastsi@debian.org>
Sat, 24 Jan 2026 12:41:42 +0000 (14:41 +0200)
As it is quite common on Debian installations to install the -dev package
without the -doc package.

Gbp-Pq: Name no-missing-haddock-file-warning

utils/ghc-pkg/Main.hs

index 236e73928cf9b91e76b51aeae401ad8055fd2e88..460214a362a9d35c1730f944e9e8fd4158d17246 100644 (file)
@@ -1907,8 +1907,10 @@ checkPackageConfig pkg verbosity db_stack
   mapM_ (checkDir True  "dynamic-library-dirs") (libraryDynDirs pkg)
   mapM_ (checkDir True  "include-dirs") (includeDirs pkg)
   mapM_ (checkDir True  "framework-dirs") (frameworkDirs pkg)
-  mapM_ (checkFile   True "haddock-interfaces") (haddockInterfaces pkg)
-  mapM_ (checkDirURL True "haddock-html")       (haddockHTMLs pkg)
+  -- In Debian, it is quite normal that the package is installed without the
+  -- documentation. Do not print a warning there.
+  -- mapM_ (checkFile   True "haddock-interfaces") (haddockInterfaces pkg)
+  -- mapM_ (checkDirURL True "haddock-html")       (haddockHTMLs pkg)
   checkDuplicateModules pkg
   checkExposedModules db_stack pkg
   checkOtherModules pkg